# 作业1
text1 = "路飞是要成为海贼王的男人。"
a = len(text1)
# 1.1
print(text1[0])
print(text1[a - 1])
# 1.2
b = "路飞海贼王" in text1
print(b)
# 1.3
print(text1[4:9])
# 1.4
print(text1[-1:-1 - a:-1])
# 作业2
text2 = input("请输入：")
if text2.endswith("老师"):
    print("是老师")
else:
    print("不是老师")
# 作业3
str1 = "aabbccddhhff"
str2 = str1.replace("h", "e")
print(str2)
